package systemf;



object Main{
  object SystemFGen {
    def newInstance(verbose:Boolean)= new Interpreter(verbose) with TypedLambdaParser with SystemFDesugar with SystemFTypeCheck with SystemFEvaluator with DeBruijnSubstitution 

  }
  
  def main(args: Array[String]) {
    println("interpreter command line")
    val ipret = SystemFGen.newInstance(true)
    
    val codeS = "\\t:bool . if t then false else true"
    val codeZ = "true"
    val codec2 = "\\[] X . \\s:(X=>X) z:X . (s (s z))"
      println("c2=");ipret.eval (codec2)
      //val codec2app = "let S = "+codeS+ " in \n let Z = "+codeZ+" in \n (("+codec2+") [bool]  S )  Z"    
        val codec2app = "let S = "+codeS+ " in \n let Z = "+codeZ+" in \n let TWO = "+codec2+" in \n ((TWO) [bool ]  S )  Z"    
    ipret.eval(codec2app)
  }
}
